<@page title="职位邀请_大街网_预见新自己！" useheader="compact" 
	assets=["/up/position-invitation/css/invitation.css",
			"/css/modules/register-pop.css",
			'/css/layout/fullwidth.css',
			'/css/channels/network.css',
			'/up/position-invitation/css/position-invitation.css',
			'/up/yaoyue/css/company-hrmail.css',
			'/css/pages/company-hrmail.css',
			'/css/site/base-form.css',
			"/up/position-invitation/js/basic-incormation.js",
			"/js/jquery.tips.js",
			"/lib/jquery/jquery.color.js",
			"/js/jquery.linkup.js", 
			"/js/jquery.inputchecknormal.js",
			'/js/jquery.freemailcheck.js',
			"/up/dic/js/intention.js",
			'/js/jquery.formvalidate.js',
			'/js/jquery.formvalidatefn.js',
			'/up/position-invitation/js/misc.js',
			'/up/mathan/mathan.js'] description="" keywords="">
<@layout.master>
<#include 'nav_pop.ftl' />
<#macro cutWord words="" length=5 prefix="" suffix="">
        <#assign wordStr = words?string!>
        <#if wordStr?length gt length>
            ${prefix}${wordStr?substring(0,length)}${suffix}
        <#else>
            ${wordStr}
        </#if>
</#macro>
<div id="content" class="clearfix">
    <#include 'dimension_fragment.ftl'/>
    <#if job??&&!job.hiddenAdviserJobCorp()>
        <div id="inviter-corp-fragment">
            <div class="basic-banner clearfix">
                <span><img alt="${(job.corpName)!""}" src="http://${configs['domains.assets']}/images/club/logo-big.gif"></span>
                <h2 title="${(job.corpName)!""}"><@cutWords words =(job.corpName!"") length =22 suffix = ""/><#if id?? && id !=0> <em class="g9">|</em> <em class="txtColor">职位邀请函</em></#if></h2>
            </div>
        </div>
    <#else>
        <#include 'inviter/inviter_corp_fragment.ftl' />
        <@inviterCorpCache id="${id!0}" cid="${job.cid!}" hiddenCorp=false/>
    </#if>
        <div class="basic-content">
            <div class="invitation-bd">
                <div class="invitation-letter">
                    <dl>
                        <dt>您好<#if userBase?? && userBase.name?? && userBase.name != "">，${(userBase.name)!""}</#if>：</dt>
                        <dd>
                            <#if invitation??> <#--商业系统邀约-->
                                <#--社招邀约-->
                                <p style="font-size:14px">${invitation.message!}</p>
                            </#if>
                        </dd>
                    </dl>
                    <div class="inscribe">
                        <div class="u-inscribe">
                            <#if inviter??>
                                <div class="u-pic"><a href="${(inviter.homepage())!"#"}" target="_blank"><img src="${inviter.getAvatarUrl("ss")}"></a></div>
                                <h3>${(inviter.name)!}</h3>
                                <#-- <p><#if inviter.identity == 1>${inviter.position!}<#elseif inviter.identity == 0>${inviter.majorName!}</#if></p> -->
                            </#if>
                        </div>
                    </div>
                </div>
                <div class="invitation-detailed">
                    <div class="break">
                        <div class="hrmail-content-name yahei">${job.title!}</div>
                        <table class="invitation-table">
                            <colgroup>
                                <col width="72">
                                <col width="80">
                                <col width="72">
                                <col width="100">
                                <col width="72">
                                <col width="130">
                                <col width="72">
                                <col width="*">
                            </colgroup>
                            <tbody>
                            <tr>
                                <td>招聘类型：</td>
                                <td><#if job.isSocialRecruit()>社会招聘<#else>校园招聘</#if></td>
                                <td>工作地点：</td>
                                <td>
                                    <#assign linkDisp = job.getCityStr(' ','')>
                                    <#if linkDisp?length gt 0><span title="${linkDisp}"><@cutWord words = (linkDisp) length = 5 suffix = "..."/></span><#else > --- </#if>
                                </td>
                                <td>薪金待遇：</td>
                                <td>
                                    <#assign linkDisp = job.getSalarySpanStr()>
                                    <#if linkDisp?length gt 0><#if linkDisp?index_of('面议') gte 0 >面议<#else>${linkDisp}</#if> <#else > 面议 </#if>
                                </td>
                                <td>所属职类：</td>
                                <td>
                                    <#assign linkDisp = job.getPositionFunctionStr(' ','')>
                                    <#if linkDisp?length gt 0><span title="${linkDisp}"><@cutWord words = (linkDisp) length = 17 suffix = "..."/></span><#else > --- </#if>
                                </td>
                            </tr>
                            <tr>
                                <td><#if job.isSocialRecruit()>工作经验：<#else>招聘对象：</#if></td>
                                <td>
                                    <#if job.isSocialRecruit()>${(experience)!"---"}
                                    <#elseif job.isSchoolFreshGraduateRecruit()>应届生
                                    <#elseif job.isSchoolInternRecruit()>实习生
                                    <#else>---
                                    </#if>
                                </td>
                                <td>所属部门：</td>
                                <td>${job.department!'---'}</td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                            </tr>
                            </tbody>
                        </table>
                        <div class="content-show J_content">
                            <p class="title"></p>
                            <p>${job.corpad!}</p>
                            <p class="title"></p>
                            <p class="title"></p>
                            <#if jobIntro?? && jobIntro!=''>
                                <#if job.type=100 || job.type=400 ><#--C2C职位-->
                                    <div style="line-height:200%"> <@nec jobIntro true/> <br/></div>
                                <#else>
                                    <div style="line-height:200%"> <@nec jobIntro/></div>
                                </#if>
                            </#if>
                        </div>
                        <a href="javascript:void(0)" class="green J_showMore">查看职位详情↓</a>
                        <p class="clearfix J_showArea" style="display:none;">
                            <#if !job.hiddenAdviserJobCorp()>
	                            <#if (corp.cid)??>
	                                <#assign corpUrl = "http://"+configs['domains.job']+"/search/index?cids="+corp.cid />
	                            <#elseif (job.cid)??>
	                                <#assign corpUrl = "http://"+configs['domains.job']+"/corp/"+job.cid />
	                            </#if>
                            <a href="${corpUrl!'#'}" class="green floatright" target="_blank" >查看公司其他职位»</a>
                            </#if>
                            <a href="javascript:void(0)" class="green J_hide">收起职位详情↑</a>
                        </p>
                    </div>
                </div>
                <#--邀请状态部分 begin-->
                <div class="button-box" id="no_op" style="display: none; height:auto;position:relative;">
                    <a id="btn-ok" class="big-fresh button margin" title="" href="javascript:void(0);"><span>我接受邀请</span></a>
                    <a id="btn-cancel" class="big-normal button" title="" href="javascript:void(0);"><span>我暂不考虑</span></a>
                    <p><span class="help g9">有疑问请<a target="_blank" href="http://${configs['domains.job']}/qna/asker?jid=${job.jid!}">点击这里</a>，已有<#if commentNum??&&commentNum gt 0>${commentNum!0}<#else >0</#if>人提问！</span></p>
                </div>
                <div class="active-box active-big-box">
                    <div id="refuse" class="hrmail-content-refuse op" style="text-align:center">
                        <em>你已于 <#if (invitation.updateDate)??>${invitation.updateDate?string("yyyy年MM月dd日")!}</#if> 忽略了该职位邀请。</em>
                    </div>
                    <div id="accept" class="hrmail-content-accept op" >
                        <em>你已于 <#if (invitation.updateDate)??>${invitation.updateDate?string("yyyy年MM月dd日")!}</#if> 接受了该职位邀请。</em>
                    </div>
                </div>
                <div id="post" class="dj-tips-normal aligncenter J_invitationEnd end-tip" style="display:none">
                    <em>此职位已于 ${job.endDate?string("yyyy年MM月dd日")!} 结束招聘，谢谢关注。</em>&nbsp;&nbsp;<a class="normal" title="" href="###"><span>删除此邀请</span></a>
                </div>
                <#--邀请状态部分 end-->
                <#--相似职位 begin-->
                <#--<#assign type='ajax'>-->
                <#--<#include "similar_job.ftl"/>-->
                <#assign requestType = 'ajax' />
                <#--<#include "recommend-jobs.ftl" />-->
                <#--相似职位 end-->
            </div>
        </div>
</div>
<div id="del-tips" class="dj-tips-base arrow-b" style="display:none;">
    <span class="arrow arrow-r"></span>
    <div class="shadow" style="width:280px;">
        <div class="inn-con">
            <p>删除成功！本页面将在2秒后关闭。</p>
        </div>
    </div>
</div>
<@holder>
<script type="text/javascript">
    //初始化邀请状态
    $(function() {
        var left_days = ${leftDays!0},
            status = ${invitation.status!0};
        if (status == 0 && left_days > -1) {
            $('#no_op').show();
        } else if (status == 1) {
            $('#accept').show();
        } else if (status == 2) {
            $('#refuse').show();
            $('#job_category_list').hide();
        } else if (left_days < 0) {
            $('#post').show();
            $('#job_category_list').hide();
            $('div .active-box').hide();
        }
    });
    $(function() {
        // 确定
        $('#btn-ok').click(function() {
            
                window.location.href = '/invitation/contact?id=${id!}&jid=${job.jid!}&status=${status!0}';
                return false; 
        });
        //忽略
        $('#btn-cancel').click(function() {
        	window.location.href = '/invitation/ignore?corpName=${job.corpName!""}&jid=${job.jid!""}';
            return false; 
        	<#--
            $cancelPop = $('#cancel-pop').tips({
                '$point':$(this),
                'width':150,
                'theme':'cancel-pop',
                'hasClose':false
            });-->
        });
    });

    //邀请过期，删除
    $(function() {
        var cancelHandle = function() {
            $('.J_invitationEnd a').unbind('click');
            delete_invitation(${invitation.id!0},${invitation.invitationType!1});
            var $cancelBtn  = $(this),
                    $tips = $('#del-tips'),
                    pos_btn = $cancelBtn.offset();
                    $tips.show().css({
                        'left' : pos_btn.left - 194,
                        'top' : pos_btn.top - 75
                    });
                    setTimeout(function(){
                        $cancelBtn.hide();
                        $tips.hide();
                        window.close();
                    }, 2000);
            $(window).resize(function(){
                        if($tips.css('display') == 'none') return;
                        pos_btn = $cancelBtn.offset();
                        $tips.css({
                            'left' : pos_btn.left - 194,
                            'top' : pos_btn.top - 75
                        });
                    });
//            $tips = $.tips({
//                '$content':'<p>删除成功！本页面将在2秒后关闭。</p>',
//                '$point':$(this),
//                'width':280,
//                'name':'del-pop',
//                'theme':'del-pop',
//                'hasClose':false
//            });
//            setTimeout(function() {
//                $tips.hide();
//                window.close();
//            }, 2000);
        };
        $('.J_invitationEnd a').click(cancelHandle);
    });
    function delete_invitation(id, invitationType) {
        if (window.name == 'notice${id!0}') {
            try{
                window.opener.delete_by_id(id, invitationType);
            }catch(e){
            }
        }
    }
    //查看职位详情
    $('.J_showMore').click(function() {
        $(this).hide();
        $('.J_content').height('auto');
        $('.content-show').show();
        $('.J_showArea').show();
        $('.J_hide').show();
    });
    //收起职位详情
    $('.J_hide').click(function() {
        $(this).hide();
        $('.J_content').height('120');
        $('.J_showMore').show();
        $('.content-show').hide();
    });
    var $aMore = $('a.more'),
        $intro = $('div.hrmail-intro'),
        $angle = $('.hrmail-content-angle'),
        $content = $('.hrmail-content'),
        $hideCon = $('span', $intro);
    $hideCon.hide();
    $content.css('zoom', '1'); // for ie6 $angle.position
    $aMore.click(function() {
        var $this = $(this);
        if ($this.text() == '更多↓') {
            $(this).text('收起↑').parent().addClass('hrmail-intro-on');
            $hideCon.show();
        } else {
            $(this).text('更多↓').parent().removeClass('hrmail-intro-on');
            $hideCon.hide();
        }
        $angle.css('bottom', '0').css('bottom', '-2px'); // for ie6 $angle.position
    });
</script>
</@holder>
<#--<#include "index-ingore.ftl"/> -->
</@layout.master>
</@page>